﻿using IBLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;

namespace ZY5.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class PlaceController : ControllerBase
    {
        public PlaceController(IPlaceBLL bll)
        {
            Bll = bll;
        }

        public IPlaceBLL Bll { get; }
        [HttpPost]
        public Task<int> AddPlace(PlaceModel place)
        {
            return Bll.AddPlace(place);
        }
        [HttpGet]
        public List<PlaceModel> GetPlaces()
        {
            return Bll.GetPlaces();
        }
    }
}
